﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _04_OutDemo
{
    internal class Program
    {
        public void SetValue(out int a, out int b)
        {
            a = 10;
            b = 20;
        }

        static void Main(string[] args)
        {
            int a = 0;
            int b = 0;
            Program p = new Program();
            Console.WriteLine("调用SetValue之前a的值：{0}", a);
            Console.WriteLine("调用SetValue之前b的值：{0}", b);
            Console.WriteLine("调用SetValue方法");
            p.SetValue(out a, out b);
            Console.WriteLine("调用SetValue之后a的值：{0}", a);
            Console.WriteLine("调用SetValue之后b的值：{0}", b);
            Console.ReadKey();
        }
    }
}
